import { Control_Listen, UI_Layer } from "../../constants/ui_def";
import { gg } from "../../frame/gg";


const { ccclass, property } = cc._decorator;

@ccclass
export default class Main extends cc.Component {


    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start() {

    }

    // update (dt) {}

    initInfo() {
        console.log("加载成功")
        cc.director.emit("transition", Control_Listen.CLOSE_TRANSITION)
        this.creatPageTest()

    }


    creatPageTest() {
        this.scheduleOnce(() => {
            console.log('加油，生成页面')
            gg.uiManager.addPage(UI_Layer.Pop, {
                name: 'testPage',
                close: true,
                cover: true,
            })
        }, 3)
    }
}
